var reverseBits = function (n) {
  return String(n).split('').reverse().join('')
};

let str = '00000010100101000001111010011100'
console.log(str)
console.log(reverseBits(str))